<?php
declare (strict_types = 1);

namespace app\model;

use think\Model;

/**
 * @property bool $is_ranking 是否排名:0=否,1=是
 * @property bool $type 排名类型:1=综合排名,2=专业排名
 * @property int $class_id 关联申请项目
 * @property int $id
 * @property int $major_id 专业分类
 * @property int $rank_id 综合分类
 * @property int $ranking 名次
 * @property int $school_id 院校
 * @property mixed $year 年份
 * @property string $createtime
 * @property-read \app\model\TalentSchool $school
 * @property-read \app\model\TalentSchoolClass $class
 * @property-read \app\model\TalentSchoolCompress $rank
 * @property-read \app\model\TalentSchoolMajor $major
 * @mixin \think\Model
 */
class TalentSchoolRank extends Model
{
    protected $createTime = 'createtime';

    function school()
    {
        return $this->belongsTo(TalentSchool::class,'school_id');
    }

    function rank()
    {
        return $this->belongsTo(TalentSchoolCompress::class,'rank_id');

    }

    function major()
    {
        return $this->belongsTo(TalentSchoolMajor::class,'major_id');
    }

    function class()
    {
        return $this->belongsTo(TalentSchoolClass::class,'class_id');
    }
}
